package factoryMode.factory.abstractFactory.order;

import factoryMode.factory.abstractFactory.pizza.BJCheesePizza;
import factoryMode.factory.abstractFactory.pizza.BJPepperPizza;
import factoryMode.factory.abstractFactory.pizza.Pizza;

/**
 * @author： pang-yun
 * @date： 2021-10-21 21:57
 * 功能目的 ：用于
 */

public class BJFactory implements AbstractFactory {
    @Override
    public Pizza createPizza(String orderType) {
        Pizza pizza = null;
        if (orderType.equals("cheese")) {
            pizza = new BJCheesePizza();
        } else if (orderType.equals("pepper")) {
            pizza = new BJPepperPizza();
        }
        return pizza;
    }
}
